package com.scnb.Strategy;

public class Dog implements Comparable<Dog> {
    int food;

    public Dog(int food){
        this.food = food;
    }

    @Override
    public int compareTo(Dog d) {
        if (this.food < d.food){
            return -1;
        }else if (this.food == d.food){
            return 0;
        }else{
            return 1;
        }
    }

    @Override
    public String toString(){
        return "food = " + food;
    }
}
